<template>
  <div class="es-header" :style="styObj">{{title}}</div>
</template>

<script>
export default {
  name: 'EsHeader',
  props: {
    title: {
      type: String,
      default: 'es-header'
    },
    bgColor: {
      type: String,
      default: '#007BFF'
    },
    color: {
      type: String,
      default: '#fff'
    },
    fsize: {
      type: Number,
      default: 12
    }
  },
  data() {
    return {
      styObj: {
        backgroundColor: this.bgColor,
        color: this.color,
        fontSize: this.fsize + 'px'
      }
    };
  }
};
</script>

<style scoped>
.es-header {
  height: 45px;
  line-height: 45px;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}
</style>